import React, { Component } from "react";
import Item from "./Item";

export default class Main extends Component {
  render() {
    let { todoList, chooseItem, deleteItem } = this.props;
    return (
      <ul className="todo-main">
        {todoList.map((todo) => {
          return (
            <Item
              todo={todo}
              key={todo.id}
              chooseItem={chooseItem}
              deleteItem={deleteItem}
            ></Item>
          );
        })}
      </ul>
    );
  }
}
